home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 22 / PCPP #22.iso / Quake2 / q2source_12_11 / utils3 / qe4 / brush.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-02  |  1.7 KB  |  67 lines

  1.  
  2. // brush.h
  3.  
  4.  
  5. typedef struct
  6. {
  7.     int        numpoints;
  8.     int        maxpoints;
  9.     float     points[8][5];            // variable sized
  10. } winding_t;
  11.  
  12.  
  13. // the normals on planes point OUT of the brush
  14. #define    MAXPOINTS    16
  15. typedef struct face_s
  16. {
  17.     struct face_s    *next;
  18.     vec3_t        planepts[3];
  19.     texdef_t    texdef;
  20.  
  21.     plane_t        plane;
  22.  
  23.     winding_t  *face_winding;
  24.  
  25.     vec3_t        d_color;
  26.     qtexture_t *d_texture;
  27.  
  28. //    int         d_numpoints;
  29. //    vec3_t     *d_points;
  30. } face_t;
  31.  
  32. #define    MAX_FACES    16
  33. typedef struct brush_s
  34. {
  35.     struct brush_s    *prev, *next;    // links in active/selected
  36.     struct brush_s    *oprev, *onext;    // links in entity
  37.     struct entity_s    *owner;
  38.     vec3_t    mins, maxs;
  39.  
  40.     face_t     *brush_faces;
  41. } brush_t;
  42.  
  43.  
  44. void     Brush_AddToList (brush_t *b, brush_t *list);
  45. void     Brush_Build(brush_t *b);
  46. void     Brush_BuildWindings( brush_t *b );
  47. brush_t *Brush_Clone (brush_t *b);
  48. brush_t    *Brush_Create (vec3_t mins, vec3_t maxs, texdef_t *texdef);
  49. void     Brush_Draw( brush_t *b );
  50. void     Brush_DrawXY( brush_t *b );
  51. void     Brush_Free (brush_t *b);
  52. void     Brush_MakeSided (int sides);
  53. void     Brush_Move (brush_t *b, vec3_t move);
  54. brush_t *Brush_Parse (void);
  55. face_t  *Brush_Ray (vec3_t origin, vec3_t dir, brush_t *b, float *dist);
  56. void     Brush_RemoveFromList (brush_t *b);
  57. void     Brush_SelectFaceForDragging (brush_t *b, face_t *f, qboolean shear);
  58. void     Brush_SetTexture (brush_t *b, texdef_t *texdef);
  59. void     Brush_SideSelect (brush_t *b, vec3_t origin, vec3_t dir, qboolean shear);
  60. void     Brush_Write (brush_t *b, FILE *f);
  61. void    Brush_RemoveEmptyFaces ( brush_t *b );
  62.  
  63. int        AddPlanept (float *f);
  64. face_t      *Face_Clone (face_t *f);
  65. void       Face_Draw( face_t *face );
  66. winding_t *MakeFaceWinding (brush_t *b, face_t *face);
  67.